<template>
	<view class="txt">
		<view class="" v-html="content"></view>
	</view>
</template>

<script>
	import { getAgreement,getPrivacy} from '@/api/user.js';
	import { getIntroduction } from '@/api/live.js'
	export default {
		data(){
			return{
				type:1,
				content:''
			}
		},
		onLoad(options) {
			console.log(options.type);
			switch (options.type){
				case '1':
					this.getIntroductions()
					break;
				case '2':
					this.getAgreements()
					break;
				case '3':
					this.getPrivacys()
					break;
				default:
					break;
			}
		},
		methods:{
			getIntroductions(){
				let that = this
				getIntroduction().then(res=>{
					// console.log(88,res)
					that.content = res.data.live_introduction_platform
				})
			},
			getAgreements(){
				let that = this
				getAgreement().then(res=>{
					that.content = res.data
				}).catch()
			},
			getPrivacys(){
				let that = this
				getPrivacy().then(res=>{
					that.content = res.data
				})
			}
		}
	}
</script>

<style>
	.txt{
		padding: 0 20upx;
	}
</style>